package com.fc.primary.algorithm;

import java.util.*;

/**
 * @program: fc-java->DuplicateRemoval
 * @description: 去重
 * @author: G_Y
 * @create: 2019-09-04 10:17
 **/
public class DuplicateRemoval {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>(Arrays.asList("1", "2", "2", "3"));
        Set<String> set = new HashSet<>(list);
        list = new ArrayList<>(set);
        list.forEach(System.out::println);
    }
}
